home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / Apertus / _install / run_unbundled < prev    next >
Text File  |  1996-02-12  |  3KB  |  133 lines

  1. #! /bin/sh 
  2. #
  3. #    Installation shell script for Catalyst CDware
  4. #
  5. #     Usage: install_unbundled -m<mountpoint> -p<productpath>
  6. #
  7. #    Created:     June 12, 1991
  8. #    Last Revised:     May 23, 1994
  9. #
  10. #    Use this installation script to install your product from Catalyst CDware
  11. #
  12. #
  13. #    For technical support, please call.
  14. #        +1 415 336.3742 (CDware SPARC) or +1 415 336.3941 (CDware x86)
  15. #
  16. #    get command line parameters
  17. #
  18. #    set PRODUCT_SIZE to the size of your product in kbytes     
  19.  
  20. #need to set whatever special here
  21. COMPANY_NAME=LOOX
  22. COMPANY_DIR=$PRODUCT_DIR/$COMPANY_NAME
  23. PRODUCT_SIZE=8000
  24.  
  25. #
  26. #    get complete paths
  27. #
  28. #
  29. #    get location of installation directory 
  30. ##
  31. #    verify the installation directory exists and is a directory
  32. #
  33. mkdir /tmp/$COMPANY_NAME
  34. INSTALL_DIR=/tmp/$COMPANY_NAME
  35. if [ ! -d "$INSTALL_DIR" ]
  36. then
  37.     echo "Creating $INSTALL_DIR ..."
  38.     mkdir $INSTALL_DIR
  39.     if [ ! -d "$INSTALL_DIR" ]
  40.     then
  41.         echo
  42.         echo
  43.         echo "Could not create the installation directory."
  44.         echo
  45.         echo "Exiting the installation script."
  46.         exit 1
  47.     fi
  48. fi
  49.  
  50. #
  51. #    verify write permission for the installation directory
  52. #
  53. if [ ! -w "$INSTALL_DIR" ]
  54. then
  55.     echo
  56.     echo
  57.     echo "You do not have write permission for the installation directory: "
  58.     echo $INSTALL_DIR
  59.     echo
  60.         echo
  61.     echo "Exiting the installation script."
  62.     exit 1
  63. fi
  64.  
  65. #
  66. #    verify free disk space
  67. #
  68. echo    
  69. echo    "Verifying free disk space..."
  70. FREE_SPACE=0
  71. df=/tmp/FREE.$$
  72. #
  73. # WARNING:
  74. # --------
  75. # For Solaris 2.4, the df line below will need to be updated because
  76. # the standard output of the df command has changed in Solaris 2.4
  77. #
  78. /usr/bin/df $INSTALL_DIR | sed /kbytes/d | sed -e '3,$d' | sed -e '1,$s/  */ /g' > $df
  79.  
  80. case `/usr/bin/wc -l $df | sed -e 's/^ *//' | cut -f1 -d" " ` in
  81.     1) FREE_SPACE=`cat $df | cut -f4 -d" "` ;; 
  82.     2) FREE_SPACE=`cat $df | sed 1d | sed 's/^ *//' | cut -f3 -d" "` ;; 
  83. esac
  84.  
  85. if [ -n $FREE_SPACE ]
  86. then
  87.     if [ $FREE_SPACE -lt $PRODUCT_SIZE ]
  88.     then
  89.         echo
  90.         echo
  91.         echo "The product installation requires $PRODUCT_SIZE kbytes of"
  92.         echo "free disk space. There is only $FREE_SPACE kbytes of free" 
  93.         echo "disk space in the selected filesystem.  Please free up some"
  94.         echo "disk space and try this installation again."
  95.         echo
  96.         echo "Exiting the installation script."
  97.         exit 1
  98.     fi
  99. fi
  100. /bin/rm $df 2>/dev/null
  101.  
  102. #
  103. #    copy binaries to installation directory
  104. #
  105. echo 
  106. echo "Copying files to "$INSTALL_DIR"..."
  107. echo
  108. #
  109. # uncomment the following line to do the actual copy
  110. #
  111.  
  112. cd $INSTALL_DIR
  113.  
  114. cp $COMPANY_DIR/_demos/eval/showexe.z $INSTALL_DIR
  115. $COMPANY_DIR/_demos/eval/gzip -d $INSTALL_DIR/showexe.z
  116.  
  117. $COMPANY_DIR/_demos/eval/gzip -cd $COMPANY_DIR/_demos/eval/tarfiles.z | tar xf -
  118.  
  119. echo
  120. echo "The installation was a success."
  121. echo
  122. echo "Running ..."
  123. echo
  124. $INSTALL_DIR/loox 
  125.  
  126. echo
  127. echo "Removing temporary files ...
  128. echo
  129. rm -r $INSTALL_DIR 
  130.  
  131.  
  132. exit 0
  133.